package com.example.javaui.slice;

import com.example.javaui.ResourceTable;
import com.example.javaui.component.NeumorImage;
import com.example.javaui.component.NeumorText;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.agp.utils.Color;

public class NeumorphismSlice extends AbilitySlice {

    @Override
    protected void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_slice_neumorphism);

        NeumorText textSubTitle = (NeumorText) findComponentById(ResourceTable.Id_neumor_text_subtitle);
        textSubTitle.setText("Step 1 of 3");
        textSubTitle.setTextSize(40);
        textSubTitle.setColor(Color.GRAY);

        NeumorText textTitle = (NeumorText) findComponentById(ResourceTable.Id_neumor_text_title);
        textTitle.setText("请选择您所感兴趣的内容");
        textTitle.setTextSize(60);

        NeumorText textGame = (NeumorText) findComponentById(ResourceTable.Id_text_neumor_game);
        textGame.setText("电竞游戏");
        textGame.setTextSize(60);
        NeumorText textSports = (NeumorText) findComponentById(ResourceTable.Id_text_neumor_sports);
        textSports.setText("运动健身");
        textSports.setTextSize(60);
        NeumorText textScience = (NeumorText) findComponentById(ResourceTable.Id_text_neumor_science);
        textScience.setText("科学技术");
        textScience.setTextSize(60);
        NeumorText textTravel = (NeumorText) findComponentById(ResourceTable.Id_text_neumor_travel);
        textTravel.setText("旅游风景");
        textTravel.setTextSize(60);


        NeumorImage imageGame = (NeumorImage) findComponentById(ResourceTable.Id_image_neumor_game);
        imageGame.setImageSrc(ResourceTable.Media_ic_game);
        NeumorImage imageSport = (NeumorImage) findComponentById(ResourceTable.Id_image_neumor_sports);
        imageSport.setImageSrc(ResourceTable.Media_ic_sports);
        NeumorImage imageScience = (NeumorImage) findComponentById(ResourceTable.Id_image_neumor_science);
        imageScience.setImageSrc(ResourceTable.Media_ic_science);
        NeumorImage imageTravel = (NeumorImage) findComponentById(ResourceTable.Id_image_neumor_travel);
        imageTravel.setImageSrc(ResourceTable.Media_ic_travel);

    }
}
